Skip to content

Switch sync workflow to merge with .gitattributes protection - #895

Merged
EliMoshkovich merged 2 commits into
masterfrom
PER-14366-sync-workflow-merge-approach
Apr 6, 2026
Merged

Switch sync workflow to merge with .gitattributes protection#895
EliMoshkovich merged 2 commits into
masterfrom
PER-14366-sync-workflow-merge-approach

Conversation

@EliMoshkovich

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the mirror/force-push sync approach with a proper git merge
  • Works together with .gitattributes in opal-plus (permitio/opal-plus#10) which marks repo-specific files with merge=ours
  • Configures merge.ours.driver in the workflow so the .gitattributes strategy is respected
  • No more force push — regular git push since merges only add commits
  • public-master starts from opal-plus master so all customizations are preserved

How it works

  1. Checkout both repos (full history)
  2. Start public-master from opal-plus/master (preserves all opal-plus customizations)
  3. git merge opal/master — brings in upstream changes
  4. .gitattributes merge=ours automatically keeps opal-plus's version of on_release.yml, tests.yml, README.md
  5. Shared files (client.py, server.py, etc.) merge normally — opal-plus's small additions (banner imports) auto-resolve
  6. Push and create/update PR

Prerequisites

  • Merge permitio/opal-plus#10 first — adds .gitattributes to opal-plus

Test plan

  • Merge opal-plus#10 (.gitattributes) first
  • Merge this PR
  • Verify the sync workflow creates a clean PR in opal-plus
  • Verify protected files (on_release.yml, README.md) keep opal-plus versions

🤖 Generated with Claude Code

Replace the mirror/force-push approach with git merge. This works
with .gitattributes merge=ours in opal-plus to automatically protect
repo-specific files (on_release.yml, tests.yml, README.md) while
allowing upstream changes to flow into shared files normally.

- Configure merge.ours.driver so .gitattributes merge=ours works
- Use git merge instead of reset --hard
- No force push needed — regular push since we only add commits
- public-master starts from opal-plus/master to preserve customizations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear

linear Bot commented Apr 6, 2026

Copy link
Copy Markdown

@netlify

netlify Bot commented Apr 6, 2026

Copy link
Copy Markdown

Deploy Preview for opal-docs canceled.

Name Link
🔨 Latest commit 890a4fb
🔍 Latest deploy log https://app.netlify.com/projects/opal-docs/deploys/69d3e077ea88f70008e8e77a

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@EliMoshkovich
EliMoshkovich merged commit 8118b63 into master Apr 6, 2026
11 of 12 checks passed
@EliMoshkovich
EliMoshkovich deleted the PER-14366-sync-workflow-merge-approach branch April 6, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant